<!-- 体质检测报告页面 -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title></title>
    <meta
      name="viewport"
      content="width=device-width,initial-scale=1,user-scalable=0"
    />
    <link rel="stylesheet" href="../res/css/weui.css" />
    <link rel="stylesheet" href="../res/css/weuix.css" />
    <link rel="stylesheet" href="../res/css/mp_common.css" />
    <link rel="stylesheet" href="../res/css/common.css" />
    <script src="../res/js/zepto.min.js"></script>
    <script src="../res/js/zepto.weui.js"></script>
    <script src="../res/js/mp_common.js?v=1"></script>
    <script src="../res/js/qrcode.min.js"></script>
    <script src="../res/js/common.js"></script>
    <script
      src="../res/js/JsBarcode.all.min.js"
      type="text/javascript"
    ></script>
  </head>
  <script>
    $(function () {
      $("#btnBack").click(function () {
        goPage("inquiry_user_personal.htm");
      });
    });
  </script>
  <style>
    .fix-top {
      border-bottom: 1px solid #e8e8e8;
      position: fixed;
      left: 0;
      top: 0;
      right: 0;
      z-index: 1;
      background: #f6f6f9;
    }   
    .context_wrappar {
      width: 95%;
      margin: 4% 0 20px 2.5%;
      margin-top: 4%;
      background-color: #fff;
      border-radius: 5px;
    }

    .context_item {
      width: 100%;
      height: 77px;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
    }
  </style>

  <body>
    <div class="fix-top" style="z-index: 100">
      <div class="weui-btn_primary weui-header">
        <div class="weui-header-left">
          <a id="btnBack" class="icon icon-109"></a>
        </div>
        <h1 class="weui-header-title">体质检测报告</h1>
      </div>
    </div>
    <div class="message_wrappar" style="margin-top:60px;margin-bottom: 100px;width: 100%;overflow: hidden;">
    </div>  
</body>
  <script>
    //获取体质报告列表
    newAjaxPost(
      "/h5/smart/getAcquireReportList",
      {},
      getAcquireReportListResultOk
    );

    function getAcquireReportListResultOk(json) {
      console.log(json);
      var context = "";
      json.data.forEach((element) => {
        context += `    <div class="context_wrappar">
        <div class="context_item" style="text-align: center;">
            <div style="width:55%">
                <p style="font-size: 14px;font-family: PingFang SC;font-weight: 500;color: #353535;padding-left:15px">${element.createTime} 的报告</p>
                <p style="font-size: 12px;font-family: PingFang SC;font-weight: 500;color: #757575;">编号：${element.number}</p>
            </div>
        <div style="width:30%;text-align: center;margin-left: 10%;font-size: 14px;font-family: PingFang SC;font-weight: 500;color: #353535;" id=${element.requestId} class="go_details">查看详情 ></div>
        </div>
    </div>`;
      });
      $(".message_wrappar").html(context);
    }
    $(".go_details").click(function () {
      localStorage.setItem("requestId", $(this).attr("id"));
      goPage("user_conditioning_plan.htm?hrefUrl=test_report");
    });
  </script>
</html>
